---
title: "Rock Plugin"
description: Build plugin for projects using [Rock](https://www.rockjs.dev/) framework, a React Native framework created by Callstack.
icon: Blocks
---

## Installation

```package-install
npm install @hot-updater/rock --save-dev
```

## Configuration

```typescript
interface RockPluginConfig {
  outDir?: string;      // Output directory (default: "dist")
  entryFile?: string;   // Entry file (default: "index.js")
  sourcemap?: boolean;  // Generate sourcemaps (default: false)
  hermes?: boolean;     // Use Hermes compiler (default: true)
}
```

## Usage

```typescript
import { rock } from '@hot-updater/rock';
import { defineConfig } from 'hot-updater';

export default defineConfig({
  build: rock({
    hermes: true,
    entryFile: 'index.js',
    sourcemap: false
  }),
  // ... other config
});
```

## Re.Pack Integration (Recommended)

Rock framework uses [Re.Pack](https://re-pack.dev/) bundler. It's recommended to use the Re.Pack plugin to set bundle ID at build time.

Install the Re.Pack plugin:

```package-install
npm install @hot-updater/repack --save-dev
```

Add the plugin to your `rspack.config.mjs`:

```js title="rspack.config.mjs"
import { HotUpdaterPlugin } from "@hot-updater/repack";

export default {
  // ...
  plugins: [
    new Repack.RepackPlugin(),
    new HotUpdaterPlugin() // [!code ++]
  ],
};
```

See the [Re.Pack integration documentation](/docs/integration-plugins/repack) for more details.

## Key Features

- Build plugin for [Rock framework](https://www.rockjs.dev/)
- Supports Hermes compilation
- Configurable output directory and entry files
